﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Comdiv.Model.Mapping;

namespace Comdiv.Messaging.Model
{
    /// <summary>
    /// default IMessage mapping
    /// </summary>
    public class MessageMap:MessageMapBase<Message>
    {
        public MessageMap():base(){
            Map(x => x.Active);
            Map(x => x.CanBeArchived);
            Map(x => x.Sender);
            Map(x => x.Target);
            Map(x => x.Text);
            Map(x => x.Answer);
            Map(x => x.Type);
            Map(x => x.AnswerDate);
            HasMany<MessageRead>(x => x.Reads).Standard("Message");
            HasMany<MessageArchive>(x => x.Archives).Standard("Message");

        }
    }
}
